package cn.wuxing.mediation.web.controller.reception;

import cn.wuxing.mediation.common.core.domain.AjaxResult;
import cn.wuxing.mediation.system.service.ISIndexService;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import java.util.List;


/**
 * 接待总况大屏Controller
 *
 * @author mediation
 * @date 2024-10-12
 */
@RestController
@RequestMapping("/screen/reception")
public class ReceptionScreenController {

    @Resource
    private ISIndexService indexService;
    /**
     * 纠纷事项登记情况
     * query  1、DAY  2、MONTH  3、YEAR  4、ALL
     * @return
     */
    @GetMapping("/disputeRegistration")
    public AjaxResult getDisputeRegistration(@RequestParam(value = "dateType",defaultValue = "DAY")String dateType) {
        if(dateType == null||dateType.equals("")) {
            dateType="DAY";
        }
        List<Object> resultData=indexService.getDisputeRegistration(dateType);
        return AjaxResult.success(resultData);
    }

    /**
     * 值班安排
     * @return
     */
    @GetMapping("/dataCount")
    public AjaxResult getDataCount() {
        List<Object> resultData=indexService.getDataCount();
        return AjaxResult.success(resultData);
    }


}
